Ride-hailing has become a popular choice for people to travel due to its convenience and speed, how to efficiently dispatch the appropriate orders to deliver passengers to the destination is a research hotspot today. Many researches focus on training a single agent, which then uniformly distributies orders, without the vehicle itself being involved in the decision making. To solve the above problem, a multi-agent reinforcement learning algorithm based on shared attention, named SARL (Shared Attention Reinforcement Learning), was proposed. In the algorithm, the order dispatching problem was modeled as a Markov decision process, and multi-agent reinforcement learning was used to make each agent become a decision-maker through centralized training and decentralized execution. Meanwhile, the shared attention mechanism was added to make the agents share information and cooperate with each other. Comparison experiments with Random matching (Random), Greedy algorithm (Greedy), Individual Deep-Q-Network (IDQN) and Q-learning MIXing network (QMIX) were conducted under different map scales, different number of passengers and different number of vehicles. Experimental results show that the SARL algorithm achieves optimal time efficiency in three different scale maps (100×100, 10×10 and 500×500) for fixed and variable vehicle and passenger combinations, which verifies the generalization performance and stable performance of the SARL algorithm. The SARL algorithm can optimize the matching of vehicles and passengers, reduce the waiting time of passengers and improve the satisfaction of passengers.
The Density Peak Clustering (DPC) algorithm cannot accurately select the cluster centers for the datasets with various density and complex shape. The Clustering by Local Gravitation (LGC) algorithm has many parameters which need manual adjustment. To address these issues, a new Clustering algorithm based on Local Gravity and Distance (LGDC) was proposed. Firstly, the local gravity model was used to calculate the ConcEntration (CE) of data points, and the distance between each point and the point with higher CE value was determined according to CE. Then, the data points with high CE and high distance were selected as cluster centers. Finally, the remaining data points were allocated based on the idea that the CE of internal points of the cluster was much higher than that of the boundary points. At the same time, the balanced k nearest neighbor was used to adjust the parameters automatically. Experimental results show that, LGDC achieves better clustering effect on four synthetic datasets. Compared with algorithms such as DPC and LGC, LGDC has the index of Adjustable Rand Index (ARI) improved by 0.144 7 on average on the real datasets such as Wine, SCADI and Soybean.